<template>
	<view class="flex-col page">
		<view class="flex-col group_2">
			<image
				:src="$IMG_URL+'16557826684196968135.png'"
				class="image_6" />
			<view class="flex-col group_3">
				<picker @change="bindPickerChange" :value="index" :range="array">
					<view class="uni-input">
						<view class="justify-between">
							<view class="flex-row">
								<image
									:src="$IMG_URL+'16557826689359081342.png'"
									class="image_7" />
								<text class="text">{{array[index]}}</text>
							</view>
							<image
								:src="$IMG_URL+'16557826689432599499.png'"
								class="image_8" />
						</view>
					</view>
				</picker>
				
				<view class="flex-col group_6">
					<image
						:src="$IMG_URL+'16557826684246479237.png'"
						class="image_9 image_10" />
					<view class="flex-row group_7 group_ipt">
						<image
							:src="$IMG_URL+'16557826680563820686.png'"
							class="image_11 image_12" />
						<input type="number" placeholder="请输入手机号" >
					</view>
				</view>
				<view class="flex-col group_8">
					<image
						:src="$IMG_URL+'16557826684246479237.png'"
						class="image_9 image_13" />
					<view class="justify-between group_7_get">
						<text v-if='showText==true' class="text_3" @click="getYZM">获取验证码</text> 
						<view v-else class="send">{{second}}s重新发送</view>
					</view>
				</view>
				<view class="justify-between group_10">
					<view class="flex-row group_ipt">
						<image
							:src="$IMG_URL+'16557826680099271215.png'"
							class="image_11 image_16" />
						<uni-easyinput type="password"  v-model="password" placeholder="请输入密码(6~12位字母+数字)" style='width: 600rpx;margin-left: 5%;border: 0 none;'></uni-easyinput>
					</view>
				</view>
				<image
					:src="$IMG_URL+'16557826684246479237.png'"
					class="image_9 image_18" />
			</view>
			<view class="flex-col group_12">
				<view class="flex-col items-center button"><text class="text_5">注册</text></view>
				<view class="button_1">
					<text class="text_6">已有账号，前去</text>
					<text class="text_7" @click="tologin">登录</text>
				</view>
			</view>
			<view class="justify-center group_13">
				<image
					:src="$IMG_URL+'16557826683604904264.png'"
					class="image_19" />
				<view class="group_14">
					<text class="text_8">已阅读并同意</text>
					<text class="text_9">《用户注册协议》</text>
					<text class="text_10">与</text>
					<text class="text_11">《隐私政策》</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				phoneNumber: "",
				code: '',
				passwd: "",
				getCodeText: '获取验证码',
				getCodeBtnColor: "#ffffff",
				getCodeisWaiting: false,
				index:0,
				array:['工长','巡检员'],
				password:'',
				showText:true,
				second:60,
			};
		},
		methods: {
			bindPickerChange: function(e) {
					// console.log('picker发送选择改变，携带值为', e.detail.value)
					
					this.index = e.detail.value
			},
			toLogin() {
				uni.hideKeyboard() //隐藏已经显示的软键盘，如果软键盘没有显示则不做任何操作。
				uni.redirectTo({
					url: 'login'
				}); //跳转到登录页
				uni.navigateBack(); //关闭当前页面，返回上一页面
			},
			tologin() {
				uni.navigateTo({
					url: 'pages/login/login'
				})
			},
			getYZM(){
				this.showText = false;
				var interval = setInterval(() => {
						let times = --this.second
						this.second = times<10?'0'+times:times //小于10秒补 0
				}, 1000)
				setTimeout(() => {
						clearInterval(interval)
						this.second=60
						this.showText = true
				}, 60000)
			}
		},
	};
</script>

<style scoped lang="css">
	.send{
		color: #666;
	}
	.is-input-border{
		border: 0 none !important;
	}
	.group_ipt input{
		padding-left: 20rpx;
	}
	.image_9 {
		width: 638rpx;
		height: 2rpx;
	}

	.group_7 {
		padding-top: 36rpx;
	}
	.group_7_get{
		padding-top: 36rpx;
		flex-direction: row-reverse;
	}
	.image_11 {
		width: 34rpx;
		height: 34rpx;
	}

	.page {
		background-color: #ffffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group_2 {
		padding: 88rpx 50rpx 46rpx 56rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.image_6 {
		align-self: center;
		border-radius: 40rpx;
		box-shadow: 0px 8rpx 20rpx 0px #1d6aff1f;
		width: 180rpx;
		height: 180rpx;
	}

	.group_3 {
		margin-top: 117rpx;
	}

	.group_12 {
		margin-top: 97rpx;
	}

	.group_13 {
		margin-top: 101rpx;
	}

	.group_6 {
		margin-top: 44rpx;
	}

	.group_8 {
		margin-top: 45rpx;
	}

	.image_15 {
		margin-left: 4.5rpx;
		margin-top: 44rpx;
	}

	.group_10 {
		padding: 43rpx 0 42rpx;
	}

	.image_18 {
		margin-left: 4.5rpx;
	}

	.button {
		margin-right: 6rpx;
		padding: 19rpx 0 31rpx;
		background-color: #1d6aff;
		border-radius: 44rpx;
	}

	.button_1 {
		margin-top: 30rpx;
		align-self: center;
		line-height: 33rpx;
	}

	.image_19 {
		margin-top: 8rpx;
		width: 20rpx;
		height: 20rpx;
	}

	.group_14 {
		margin-left: 12rpx;
		line-height: 26rpx;
		height: 26rpx;
	}

	.image_8 {
		margin-right: 6rpx;
		align-self: center;
		width: 28rpx;
		height: 16rpx;
	}

	.image_10 {
		margin-left: 4rpx;
	}

	.image_13 {
		margin-left: 4rpx;
	}

	.text_5 {
		color: #ffffff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.text_6 {
		color: #999999;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_7 {
		color: #1d6aff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_8 {
		color: #999999;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_9 {
		color: #181818;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_10 {
		color: #999999;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_11 {
		color: #181818;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.image_7 {
		margin-top: 7rpx;
		flex-shrink: 0;
		width: 34rpx;
		height: 36rpx;
	}

	.text {
		margin-left: 28rpx;
		margin-bottom: 5rpx;
		color: #bfbfbf;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.image_12 {
		margin-top: 8rpx;
	}

	.text_1 {
		margin-left: 28rpx;
		margin-bottom: 4rpx;
		color: #bfbfbf;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.text_3 {
		margin: 3rpx 0 7rpx;
		color: #1d6aff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.image_16 {
		flex-shrink: 0;
	}

	.text_4 {
		margin-left: 28rpx;
		color: #bfbfbf;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.image_14 {
		margin-top: 9rpx;
		flex-shrink: 0;
	}

	.text_2 {
		margin-left: 28rpx;
		margin-bottom: 5rpx;
		color: #bfbfbf;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}
</style>
